package com.iplusbot.api;

import java.util.Arrays;

public class Mission {

    // 任务状态
    public final static int PENDING = 0;
    public final static int RUNNING = 1;
    public final static int HOLD_WAITING = 2;
    public final static int FAIL_WAITING = 3;
    public final static int CANCELING = 4;
    public final static int FINISHED  = 5;
    public final static int CANCELED = 6;
    public final static int ABORTED  = 7;

    private String ref_uuid;
    public String getRefUuid() { return this.ref_uuid; }
    public void setRefUuid(String v) { this.ref_uuid = v; }

    private String src;
    public String getSrc() { return this.src; }
    public void setSrc(String v) { this.src = v; }

    private String description;
    public String getDescription() { return this.description; }
    public void setDescription(String v) { this.description = v; }

    private int req_robot;
    public int getReqRobot() { return this.req_robot; }
    public void setReqRobot(int v) { this.req_robot = v; }

    private int priority;
    public int getPriority() { return this.priority; }
    public void setPriority(int v) { this.priority = v; }

    private MissionStep[] steps;
    public MissionStep[] getSteps() {return this.steps;}
    public void setSteps(MissionStep[] v) {this.steps = v;}

    private int id;
    public int getId() { return this.id; }
    public void setId(int v) { this.id = v; }

    private int robot_id;
    public int getRobotId() { return this.robot_id; }
    public void setRobotId(int v) { this.robot_id = v; }

    private int state;
    public int getState() { return this.state; }
    public void setState(int v) { this.state = v; }

    private String err_msg;
    public String getErrMsg() { return this.err_msg; }
    public void setErrMsg(String v) { this.err_msg = v; }

    @Override
    public String toString() {
        return String.format("Mission{ref_uuid:%s, id:%d, state:%d, robot_id:%d, steps: %s}", ref_uuid, id, state, robot_id, Arrays.toString(steps));
    }
}
